import Layout from '@/components/layout/index.vue';

export default [
    {
        path: '/',
        redirect: '/home',
        name: 'layout',
        component: Layout,
        meta: {
            title: 'Layout页面',
            noCache: true,
        },
        children: [
            {
                path: 'home',
                name: 'home',
                meta: {
                    title: '首页展示',
                    noCache: false,
                    access: ['superAdmin', 'admin'],
                },
                component: () => import(/* webpackChunkName: "Home" */ '@/views/home/Home.vue'),
            },
            {
                path: 'about',
                name: 'about',
                meta: {
                    title: 'about页面',
                    noCache: false,
                    access: ['admin'],
                },
                component: () => import(/* webpackChunkName: "about" */ '@/views/about/About.vue'),
            },
            {
                path: 'demo',
                name: 'demo',
                meta: {
                    title: 'demo页面',
                    noCache: false,
                    access: ['admin'],
                },
                component: () => import(/* webpackChunkName: "about" */ '@/views/demo/index.vue'),
            },
        ],
    },
    {
        path: '/401',
        name: 'error_401',
        meta: {
            noCache: true,
        },
        component: () => import(/* webpackChunkName: "ERROR" */ '@/views/error/401.vue'),
    },
    {
        path: '*',
        name: 'error_404',
        meta: {
            noCache: true,
        },
        component: () => import(/* webpackChunkName: "ERROR" */ '@/views/error/404.vue'),
    },
];
